import http from "../utils/request/index.js";

//获取验证码
export const getCode = () => http.get("/users/getCaptcha?",{
  params:{
    v:"next"
  }
});

//用户名登录
export const getLogin = (username, password) =>
  http.post("/users/login", {
    username: username,
    password: password,
  });

  //校验用户名登绿的验证码
  export const getCaptchatt = (captcha)=>http.get("/users/verifyCaptcha",{
    params:{
      captcha:captcha
    }
  })


//获取手机验证码
export const SmsPhoneNumberCode = (phoneNumber) =>
  http.post("/sms/send", {
    phoneNumber: phoneNumber,
  });
  
//手机登录
export const SmsPhoneNumberLogin = (code)=>http.post('/users/login?type=sms',{
    code:code
})


